import service from '@/request/index'

export const getRealTimeData = (num, params) => {
    return service({
        method: 'get',
        url: '/api/realtimedata/' + num,
        params
    })
};

export const saveProductWork = data => {
    return service({
        method: 'post',
        url: '/api/productorder/work/create',
        data
    })
};

export const saveTightenData = data => {
    return service({
        method: 'post',
        url: '/api/tightendata/create',
        data
    })
};

export const getProductOrderBarcode = params => {
    return service({
        method: 'get',
        url: '/api/productorder/title/barcode/get',
        params
    })
};

export const createHelpInfo = data => {
    return service({
        method: 'post',
        url: '/api/helpInfo/create',
        data
    })
};

export const deleteHelpInfo = workStationId => {
    return service({
        method: 'delete',
        url: '/api/helpInfo/delete?workStationId=' + workStationId
    })
};

export const getHelpInfos = () => {
    return service({
        method: 'get',
        url: '/api/helpInfo/all'
    })
};

export const getCusCodeLable = () => {
    return service({
        method: 'get',
        url: '/api/cuscodelable/get'
    })
};

export const setCusCodeLable = data => {
    return service({
        method: 'post',
        url: '/api/cuscodelable/set',
        data
    })
};

export const getPackageNum = () => {
    return service({
        method: 'get',
        url: '/api/workstation26/get',
    })
};

export const createProductOutStock = data => {
    return service({
        method: 'post',
        url: '/api/productoutstock/create',
        data
    })
};

export const addProductOutStockdetail = data => {
    return service({
        method: 'post',
        url: '/api/productoutstock/detail/add',
        data
    })
};

export const removeProductOutStockdetail = data => {
    return service({
        method: 'post',
        url: '/api/productoutstock/detail/remove',
        data
    })
};

export const getProductOutStockDetailPageList = data => {
    return service({
        method: 'post',
        url: '/api/productoutstock/detail/page',
        data
    })
};

export const getDailyReport = () => {
    return service({
        method: 'get',
        url: '/api/productorder/largescreen/dailyreport',
    })
};

export const getMonthReport = () => {
    return service({
        method: 'get',
        url: '/api/productorder/largescreen/monthreport',
    })
};
export const exportProductOutStockList = data => {
    return service({
      method: 'post',
      url: '/api/productoutstock/export',
      data,
      responseType: 'blob'
    })
};
export const getSmallScreenDataApi = params =>{
    return service({
        method:'get',
        url:'/api/realtimedata/smallscreen'
    })
};
export const getDetailTotal = params =>{
    return service({
        method:'get',
        url:'/api/productorder/work/total',
        params
    })
};
export const minusscrew = num =>{
    return service({
        method:'get',
        url:'/api/productorder/minusscrew?num=' + num
    })
};
export const exportSelProductOutStockList = data => {
    return service({
      method: 'post',
      url: '/api/productoutstock/selexport',
      data,
      responseType: 'blob'
    })
};
export const getJudgeState = params => {
    return service({
      method: 'get',
      url: '/api/productoutstock/judge',
      params
    })
  };

export const isscancode = data => {
    return service({
        method: 'post',
        url: '/api/productorder/work/isscancode',
        data
    })
};

export const passorng = intOk =>{
    return service({
        method:'post',
        url:'/api/productorder/work/passorng?ok=' + intOk
    })
};

export const judgetmpbarcode = params => {
    return service({
      method: 'get',
      url: '/api/productorder/judge/tmpbarcode',
      params
    })
  };

  export const judgematerialtmpbarcode = params => {
    return service({
      method: 'get',
      url: '/api/productorder/judge/materialtmpbarcode',
      params
    })
  };